package com.rdsm.custom;

import com.rdsm.read.R;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ImageTextView extends LinearLayout {
	
	private TextView imgbtn;
	private TextView title;
	private TextView author;
	private TextView time;
	
	public ImageTextView(Context context) {
		super(context);
	}

	public ImageTextView(Context context, AttributeSet attrs) {
		super(context, attrs);
		LayoutInflater.from(context).inflate(R.layout.imagetextview, this, true);
		
		imgbtn=(TextView)findViewById(R.id.img);
		title=(TextView)findViewById(R.id.title);
		author=(TextView) findViewById(R.id.author);
		time=(TextView) findViewById(R.id.time);
	}
	
	public void setImageResource(int resId){
		imgbtn.setBackgroundResource(resId);
	}
	
	public void setTitleText(String str){
		title.setText(str);
	}
	
	public void setAuthorText(String str){
		author.setText(str);
	}
	
	public void setTimeText(String str){
		time.setText(str);
	}
	
}
